<template>
  <div id="wrap">
    <div id="header">
      <div class="tel">
        <i class="el-icon-phone-outline"></i>
        客户服务热线: 400 065 5799
      </div>
    </div>

    <!-- 中间部分 -->
    <div class="sign-wrap">
      <div class="sign-slide-box">
        <a href="" class="logo">
          <img
            src="https://static.zhipin.com/v2/web/geek/images/logo.png"
            alt=""
          />
          <div>
            <p>找工作</p>
            <p>上BOSS直聘直接谈</p>
          </div>
        </a>
        <ul>
          <li>
            <i class="icon"></i>
            <span>沟通</span>
            <span>在线职位及时沟通</span>
          </li>
          <li>
            <i class="icon"></i>
            <span>任性选</span>
            <span>各大行业职位任你选</span>
          </li>
        </ul>
      </div>

      <!-- 扫码登录 -->
      <SignScan v-if="flag" @showSms="showSmsHandle" />

      <!-- 验证码登录 -->
      <SignSms v-else @showSms="showSmsHandle" />
    </div>
  </div>
</template>

<script>
// 扫码登录
import SignScan from "./SignScan";

// 验证码登录
import SignSms from "./SignSms";
export default {
  name: "MyLogin",
  data() {
    return {
      flag: true,
    };
  },
  components: {
    SignScan,
    SignSms,
  },
  methods: {
    showSmsHandle(value) {
      this.flag = value;
    },
  },
  beforeCreate() {
    document
      .querySelector("body")
      .setAttribute(
        "style",
        "background:#5dd5c8 url(https://static.zhipin.com/zhipin-geek/v573/web/geek/images/newbg.png) center top no-repeat"
      );
  },

  //   beforeDestroy() {
  //     document.body.removeAttribute("style");
  //   },
};
</script>

<style lang="less" scoped>
#wrap {
  min-width: auto;
  position: relative;
  min-height: 100%;
  overflow: visible;

  #header {
    box-shadow: none;
    width: 100%;
    height: 49px;
    position: relative;
    z-index: 999;

    .tel {
      float: right;
      height: 20px;
      padding: 60px 60px 0 0;
      line-height: 20px;
      color: #fff;
      vertical-align: middle;
      opacity: 0.7;
      font-size: 14px;

      .el-icon-phone-outline {
        padding-right: 3px;
        vertical-align: middle;
        font-size: 14px;
        font-style: normal;
      }
    }
  }

  .sign-wrap {
    width: 740px;
    height: 590px;
    background: #fff;
    box-shadow: 0 6px 13px 0 rgb(0, 0, 0/10%);
    border-radius: 10px;
    margin: 0 auto;

    .sign-slide-box {
      width: 240px;
      height: 100%;
      float: left;
      border-radius: 12px 0 0 10px;
      background-color: #f8fcff;

      .logo {
        display: block;
        width: auto;
        height: 40px;
        margin: 88px 0 0 40px;
        text-decoration: none;

        img {
          width: 42px;
          height: 42px;
          float: left;
          border: none;
        }

        div {
          float: left;
          position: relative;
          bottom: -1px;
          margin-left: 10px;

          p {
            color: #00c2b3;
            line-height: 20px;
            font-size: 14px;
          }
        }
      }

      ul {
        margin: 50px 0 0 40px;

        li {
          margin-bottom: 50px;

          &:nth-of-type(4n + 1) i {
            background-position: 0 10px;
          }

          &:nth-of-type(4n + 2) i {
            background-position: 0 -45px;
          }

          i {
            float: left;
            width: 25px;
            height: 42px;
            background: url(https://static.zhipin.com/zhipin-geek/v573/web/geek/images/sign-slide.png)
              no-repeat;
            background-size: 100% auto;
          }

          & > span:first-of-type {
            line-height: 22px;
            color: #8d92a1;
            font-size: 16px;
            font-weight: 700;
          }

          & > span:last-of-type {
            margin-top: 2px;
            line-height: 18px;
            color: #b0b4c1;
            font-size: 13px;
          }

          & > span {
            display: block;
            margin-left: 50px;
          }
        }
      }
    }
  }
}
</style>